package com.yxw.live_vod_boot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yxw.live_vod_boot.dto.live_comment.*;
import com.yxw.live_vod_boot.entity.YxLiveCommentEntity;
import com.yxw.live_vod_boot.vo.LiveBannedUserVO;
import com.yxw.live_vod_boot.vo.LiveCommentStatsVO;
import com.yxw.live_vod_boot.vo.LiveCommentVO;
import com.yxw.live_vod_boot.vo.LiveSilencedUserVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LiveCommentMapper extends BaseMapper<YxLiveCommentEntity> {

    List<LiveCommentVO> getLiveCommentLisByLiveId(Page<LiveCommentVO> page, @Param("liveId") String liveId);

    LiveCommentStatsVO getCommentStatsByLiveId(String liveId);

    Boolean checkCommentUserIsLimit(@Param("liveId") String liveId, @Param("userId") String userId);

    void silencedUser(@Param("dto") LiveCommentSilencedUserDTO dto);

    List<LiveSilencedUserVO> getSilencedUserList(Page<LiveSilencedUserVO> page, @Param("dto") LiveCommentSilencedUserQueryDTO dto);

    Boolean checkLiveUserIsBanned(@Param("liveId") String liveId, @Param("userId") String userId);

    void bannedUser(@Param("dto") LiveBannedUserDTO dto);

    List<LiveBannedUserVO> getBannedUserList(Page<LiveBannedUserVO> page, @Param("dto") LiveBannedUserQueryDTO dto);

    List<LiveBannedUserVO> getBannedUserListByShop(@Param("shopId") Long shopId);

    void deleteSilencedUser(@Param("dto") LiveCommentSilencedUserDeleteDTO dto);

    void deleteBannedUser(@Param("dto") LiveBannedUserDeleteDTO dto);
}